package com.jyy.server.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.jyy.server.mapper.PoliticsStatusMapper;
import com.jyy.server.pojo.PoliticsStatus;
import com.jyy.server.service.IPoliticsStatusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author rica
 * @since 2021-09-21
 */
@Service
public class PoliticsStatusServiceImpl extends ServiceImpl<PoliticsStatusMapper, PoliticsStatus> implements IPoliticsStatusService {

    @Autowired
    private PoliticsStatusMapper politicsStatusMapper;

    /**
     * 根据名称获取政治面貌
     * @param name
     * @return
     */
    @Override
    public PoliticsStatus getPoliticByName(String name) {
        return politicsStatusMapper.selectOne(new QueryWrapper<PoliticsStatus>().eq("name",name));
    }
}
